﻿package mortal.game.net.command.market
{
    import Framework.MQ.*;
    import Message.Game.*;
    import mortal.game.cache.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.mvc.core.*;

    public class MarketGetMyRecordsCommand extends BroadCastCall
    {

        public function MarketGetMyRecordsCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            super.call(param1);
            var _loc_2:* = param1.messageBase as SSeqMarketItem;
            if (_loc_2.recordType == EMarketRecordType._EMarketRecordSeekBuy)
            {
                Cache.instance.market.updateMySeekBuyMarketItemVec(_loc_2);
                NetDispatcher.dispatchCmd(ServerCommand.MarketGetMySeekBuysBack, _loc_2);
            }
            else if (_loc_2.recordType == EMarketRecordType._EMarketRecordSell)
            {
                Cache.instance.market.updateMySaleMarketItemVec(_loc_2);
                NetDispatcher.dispatchCmd(ServerCommand.MarketGetMySellsBack, _loc_2);
            }
            return;
        }// end function

    }
}
